=================================================

The Anatomy of a Hospital System Merger:The Patient Did Not Respond Well to Treatment
Replication Archive

=================================================

Martin Gaynor (mgaynor@cmu.edu)
Adam Sacarny (ajs2102@columbia.edu)
Raffaella Sadun (rsadun@hbs.edu)
Chad Syverson (chad.syverson@chicagobooth.edu)
Shruthi Venkatesh (shruthiv@cmu.edu)

September 2023

=================================================



Overview
=========
The scripts in this replication archive are divided into two main directories: Build and Analysis. 

The Build folder contains scripts that make the hospital-year panel and estimate the input, financial, and clinical outcomes used in the main analysis. The scripts to construct additional outcomes and data used in the Appendix are in build_appendix_data/. 

The Analysis folder contains the scripts that create all of tables and figures in the paper. 


Details
=========

In the /Build/ directory: 

Hospital-year Base Panel
-----------------------------------
1a - 1c: Builds the AHA data, hospital cost reports (HCRIS), and Case Mix data 

2_runbuild.do : Combines the AHA, HCRIS, and Case Mix data to create a hospital-year panel data set which serves as the base for the rest of the analysis.


Physician Flows Outcomes
-----------------------------------
3a and 3b: Prepares the physician flow variables. Script 3a_prepare_physician_flows.do: extracts physician volume and charge info at the hospital level from Medicare claims

3b_wtd_transitions.py: estimates the charge- and volume- weighted physician flow variables at the hospital-year level; See the header comments to 3a for more info. 


Vendor Distance Outcomes
-----------------------------------
4a and 4b: Prepares the HIMSS vendor distance variables. 

4a_build_himss: processes the raw HIMSS files to vendor and software application info aggregated at the hospital-year level. 

4b_vendor_distance: uses the output in 4a_ to construct the vendor distance outcome. 

 
Survival and Readmission Outcomes: 
-----------------------------------
build_survreadm/ contains the files that extract clinical cohorts and estimate 30-day survival and readmission outcomes. 

The code in this directory should be run in the following order: 
1. set_up_directory.do
2. run1raw_cohort_SV.sh
3. run2_create_cohort_level_data_SV.sh
4. 5a_makedata.do
5. 5b_prepare.do
6. 5c_stack.R 

icd9_chrt_definition.sas: Specifies the clinical cohort definitions. 

set_up_directory.do: Set up directories for clinical cohort extraction from Medicare data. 

run1raw_cohort_SV.sh and run2_create_cohort_level_data_SV.sh: Extracts clinical cohorts and assembles cohort-specific files. 

5a_makedata.do: uses the clinical cohorts data to estimate risk-adjusted survival and readmission outcomes for each hospital-year. 

5b_prepare.do: re-bases the data from CMS Provider Numbers to the AHA ID-based concept used in our analysis. 

5c_stack.R makes a hospital-year-cohort data set for the difference-in-difference regression.


Appendix Data: build/build_appendix/data/
------------------------------------------
Files to build supplementary data used in the Appendix tables and figures are in build/build_appendix_data/.

01_ creates the hospital-year analytic data restricting to hospitals with complete data on all outcomes. 
02_ builds survival and readmission outcomes from 2001-2014. 
03_ extends the base hospital-year analytic data from 2001-2014 used in Table A5. 
04_ creates a hospital-year-clinical cohort level data set with survival and readmission outcomes from 2001-2014
05_ and 06_ assemble granular cost outcomes  (Table A7). 
 
-----------------------------------
Analysis
-----------------------------------
Table1_desc.do: Assemble the descriptive statistics by hospital system in Table 1. 

Table2_main.do: Estimate equation (1) in the text and outputs the results in Table 2.

Table2_main_survreadm.do: Called by Table2_main.do; bring in the "stacked" hospital-year-cohort level file with survival and readmission outcomes (built by 5c_stack.R) and estimate equation (2) in the text. 

Table3_main.do: compute the means and standard deviations of the management scores by hospital system. These estimates are presented in Table 3. 

Figure1_estimate_event_study.do: estimate regressions for the event study analyses (Figures 1, A2, and A4)

Plot_all.do: plot all the figures in the text (Figures 1-2, Figures A1-A4). 

Fig1A_shares.do:  computes the share of hospitals adopting the acquirer-linked EMR in Fig 1A. 

TableA1-A4.do, TableA5.do, TableA7.do - TableA9.do: each of these files output the corresponding Appendix table. 

TableA1-A4_survreadm.do, and TableA5_survreadm.do estimate effects on survival and readmission outcomes. 




